using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Media;

namespace MainGame.GameSound
{

  public enum GamePlaySounds
  {
    GamePlaySoundA = 0,
    GamePlaySoundB = 1,
    GamePlayClick = 2
  }


  public class GamePlaySoundManager : SoundManager<GamePlaySounds>
  {
    public GamePlaySoundManager(Game game)
      : base(game) { }

    protected override void Dispose(bool disposing)
    {
      base.Dispose(disposing);
    }

    public override void Initialize()
    {
      soundLibrary = new SoundEffect[(int)GamePlaySounds.GamePlayClick + 1];
      // Load all menu sounds
      var content = Game.Content;
      soundLibrary[0] = content.Load<SoundEffect>(@"Sounds\\iotu_s_tilefix");


      base.Initialize();
    }

    public override void PlaySound(GamePlaySounds sound)
    {
      int snum = (int)sound;
      SoundEffectInstance sInst = soundLibrary[snum].CreateInstance();
      AddToPlayingQueue(sInst);
      sInst.Play();
    }

  }
}
